﻿#ifndef FORWARD_SERVER_H
#define FORWARD_SERVER_H

#include <QObject>
#include <QTcpServer>
#include <QtConcurrent>
#include "forward_control.h"
class forward_server : public QTcpServer
{
    Q_OBJECT
public:
    explicit forward_server(QObject *parent = nullptr);
    
    void startServer();  //开启服务
    void stopServer();   //停止服务
signals:
    
private:
    int m_Port = 1116; //端口嘛
    QHostAddress m_Address = QHostAddress::AnyIPv4; //地址嘛
    
protected:
    void incomingConnection(qintptr socketDescriptor);  //处理进来的连接
};

#endif // FORWARD_SERVER_H
